#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class Meterial : Business.BusinessBase<Meterial, int>
	{
		#region Fields and Properties

		private int vision = 0;
		/// <summary>
		/// 
		/// </summary>
		public int Vision
		{
			get { return vision; }
			set
			{
				if (value != vision)
				{
					MarkChanged("Vision");
					vision = value;
				}
			}
		}

		private Decimal price = 0.0m;
		/// <summary>
		/// 
		/// </summary>
		public Decimal Price
		{
			get { return price; }
			set
			{
				if (value != price)
				{
					MarkChanged("Price");
					price = value;
				}
			}
		}

		private String des = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Des
		{
			get { return des; }
			set
			{
				if (value != des)
				{
					MarkChanged("Des");
					des = value;
				}
			}
		}

		private String meterialCate = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String MeterialCate
		{
			get { return meterialCate; }
			set
			{
				if (value != meterialCate)
				{
					MarkChanged("MeterialCate");
					meterialCate = value;
				}
			}
		}

		private String publish = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Publish
		{
			get { return publish; }
			set
			{
				if (value != publish)
				{
					MarkChanged("Publish");
					publish = value;
				}
			}
		}

		private String name = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Name
		{
			get { return name; }
			set
			{
				if (value != name)
				{
					MarkChanged("Name");
					name = value;
				}
			}
		}

		private String iSBN = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String ISBN
		{
			get { return iSBN; }
			set
			{
				if (value != iSBN)
				{
					MarkChanged("ISBN");
					iSBN = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public Meterial()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override Meterial DataSelect(int id)
		{
			return Services.DALService.MeterialService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.MeterialService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.MeterialService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.MeterialService.Delete(this);
		}

		#endregion Base overrides
	}
}
